package config

// UserSrvConfig /* 用户服务配置类型
type UserSrvConfig struct {
	Host string `mapstructure:"host"`
	Port int    `mapstructure:"port"`
	Name string `mapstructure:"name"`
}

type ProjectSrv struct {
	Host string `mapstructure:"host"`
	Port int    `mapstructure:"port"`
	Name string `mapstructure:"name"`
}

// JWTConfig /* jwt配置类型
type JWTConfig struct {
	SigningKey string `mapstructure:"key"`
}

// AliSmsConfig /* 阿里短信服务配置类型
type AliSmsConfig struct {
	ApiKey    string `mapstructure:"key"`
	ApiSecret string `mapstructure:"secret"`
}

// RedisConfig /* redis配置类型
type RedisConfig struct {
	Host    string `mapstructure:"host"`
	Port    int    `mapstructure:"port"`
	Expired int    `mapstructure:"expired"`
}

// ConsulConfig /* consul配置类型
type ConsulConfig struct {
	Host string `mapstructure:"host"`
	Port int    `mapstructure:"port"`
}

// ServerConfig /* 服务配置类型
type ServerConfig struct {
	Name           string        `mapstructure:"name"`
	Port           int           `mapstructure:"port"`
	UserSrvInfo    UserSrvConfig `mapstructure:"user_srv"`
	ProjectSrvInfo ProjectSrv    `mapstructure:"project_srv"`
	JWTInfo        JWTConfig     `mapstructure:"jwt"`
	AliSmsInfo     AliSmsConfig  `mapstructure:"sms"`
	RedisInfo      RedisConfig   `mapstructure:"redis"`
	ConsulInfo     ConsulConfig  `mapstructure:"consul"`
}
